﻿//==================================================================
// Copyright (C) 2011  BPM
// 作 者：朱云
// 日 期：2011/12/30
// 描 述：对其CrmTeachSumup操作
// 版 本：1.00
// 
// 修改历史纪录
// 版 本  修改时间      修改人            修改内容     
//    
//==================================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using HF.Framework.SqlDataContract;
using HF.Framework.DataClientDBAgent;
namespace HF.Business.CrmTeachSumup
{
    public class CrmCustomer
    {

        /// <summary>
        /// 获得CrmTeachSumup表
        /// </summary>
        /// <param name=WorkflowInsId></param>
        /// <returns></returns>
        public static DataTable GetCrmCustomerTable(string Code)
        {
            try
            {
                string sql = "select * from dbo.CrmCustomer where Code=@Code";
                SqlDataItem sqlItem = new SqlDataItem();
                sqlItem.CommandText = sql;
                sqlItem.AppendParameter("@Code",Code);
                ClientDBAgent agent = new ClientDBAgent();
                return agent.ExecuteDataTable(sqlItem);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static DataTable GetCrmCustomerName()
        {
            try
            {
                string sql = "select * from dbo.CrmCustomer";
                SqlDataItem sqlItem = new SqlDataItem();
                sqlItem.CommandText = sql;
                ClientDBAgent agent = new ClientDBAgent();
                return agent.ExecuteDataTable(sqlItem);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
